package com.itzhoun;

import org.springframework.boot.SpringBootExceptionReporter;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author 周楠
 * @Date 2023/03/11/下午 10:52
 */
public class MyExceptionReporter implements SpringBootExceptionReporter {

    private ConfigurableApplicationContext context;

    public MyExceptionReporter(ConfigurableApplicationContext context) {
        this.context = context;
    }

    @Override
    public boolean reportException(Throwable failure) {
        System.out.println("进入异常报告自定义的方法。");
        failure.printStackTrace();
        return false;
    }
}
